/**
 * 
 */
package org.cnbi.utils.chart.xml.component;


import java.io.Serializable;
import java.text.DecimalFormat;

import javax.xml.bind.annotation.XmlAttribute;

import org.cnbi.utils.chart.component.Data;
import org.codehaus.jackson.annotate.JsonIgnore;

/**
 * @company 中国经邦
 * @author Administrator
 * @date: 2014年3月14日下午5:38:23
 * @version: V1.0
 */
/*@XmlRootElement(name = "set")*/
public class XmlData extends Data {
	/*
	private String label;
	private String value;
	private String color;
	private String link;
	private String tooltext ;
	@JsonIgnore
	public static DecimalFormat format = new DecimalFormat("#,##0.00");*/
	


	public XmlData() {
	}

	/**
	 * @param label
	 * @param value
	 * @param color
	 * @param link
	 */
	public XmlData(String label, String value, String color, String link) {
		super();
		this.label = label;
		this.value = value;
		this.color = color;
		this.link = link;
	}

	public XmlData(String label, String value) {
		this.label = label;
		this.value = value;
	}

	public XmlData(String label, String value, String color) {
		this.label = label;
		this.value = value;
		this.color = color;
	}

	@XmlAttribute
	public String getLabel() {
		return label;
	}

	@XmlAttribute
	public String getValue() {
		return value;
	}

	@XmlAttribute
	public String getColor(){
		return color;
	}

	@XmlAttribute
	public String getLink() {
		return link;
	}
	
	@XmlAttribute
	public String getTooltext() {// t["index0"]+","+t[pro]
		if (null == label) {
			return null;
		} else {
			if (null == value) {
				return null;
			}
			return this.label + "," + format.format(Float.parseFloat(value));
		}

	}
	
	
}
